<div class="modal-header">
  <h4 class="modal-title" id="modal-basic-title">{{title}}</h4>
  <button type="button" class="btn-close" aria-label="Close" (click)="cancelClicked()">
  </button>
</div>
<div class="modal-body">

  @if (!object && message) {
    <p class="mb-3" [innerHTML]="message | safeHtml"></p>
  }

  <form [formGroup]="form">
    <pngx-permissions-form [users]="users" formControlName="permissions_form"></pngx-permissions-form>
  </form>

</div>
<div class="modal-footer">
  @if (!buttonsEnabled) {
    <div class="spinner-border spinner-border-sm me-2" role="status"></div>
    <span class="visually-hidden" i18n>Loading...</span>
  }
  <button type="button" class="btn btn-outline-primary" (click)="cancelClicked()" [disabled]="!buttonsEnabled" i18n>Cancel</button>
  <button type="button" class="btn btn-primary" (click)="confirmClicked.emit(permissions)" [disabled]="!buttonsEnabled" i18n>Confirm</button>
</div>
